﻿using MediatR;
using RBAC.LuFang.API.Application.Command.EnterpriseCommand;
using RBAC.LuFang.Domain.Traceability;
using RBAC.LuFang.Domin.Services.TraceabilityService;

namespace RBAC.LuFang.API.Application.CommandHandlers.EnterpriseHandler
{
    //反填养殖下企业信息
    public class EnterpriseFanCommandHandler:IRequestHandler<EnterpriseFanCommand,Enterprise>
    {
        private readonly IGoodsService _goodsService;

        public EnterpriseFanCommandHandler(IGoodsService goodsService)
        {
            _goodsService = goodsService;
        }

        public async Task<Enterprise> Handle(EnterpriseFanCommand request, CancellationToken cancellationToken)
        {
            return await _goodsService.FanEnter(request.goodsId);
        }
    }
}
